Auto merge of #4433 - alexcrichton:unstable-features, r=matklad
authorbors <bors@rust-lang.org>
Fri, 25 Aug 2017 16:02:02 +0000 (16:02 +0000)
committerbors <bors@rust-lang.org>
Fri, 25 Aug 2017 16:02:02 +0000 (16:02 +0000)
commit3da1443551a900bf6501445cd54b7082a39ea827
treefdaa0d601eae1532ddd6ed0e4bc94912a2dfc6e4
parent69fa59a07df99d963f0f3d54b4812ea6bec25562
parentf26fc37df087812397663483709c65ba64bd863f
Auto merge of #4433 - alexcrichton:unstable-features, r=matklad

Add infrastructure for nightly features and flags

This PR starts adding infrastructure in Cargo for nightly features and nightly flags. The current design looks like:

* There's a new `package.cargo-features` manifest key which accepts an array of strings. This array of strings is the list of enabled Cargo features for that crate.
* A new suite of flags behind `-Z`, like the compiler, are accepted on the command line for all commands.
* Features and unstable flags in Cargo are required to be used on Cargo's nightly channel, which is the same as Rust's nightly channel.
* Features and unstable flags cannot be used on the stable/beta channels of Rust/Cargo.
* Crates which enable features in their manifest are disallowed from being published to crates.io

The motivation behind this support is unblock a number of efforts in Cargo by allowing them to safely get implemented behind a nightly feature gate. Once behind a feature gate they can iterate in-tree without having to worry about "insta stability" and we can also get valuable usage feedback about upstream users.

Closes https://github.com/rust-lang/cargo/issues/4409